package tg.webclient.rj.beans.workorder;

import java.rmi.RemoteException;

import psdi.mbo.MboRemote;
import psdi.mbo.MboSetRemote;
import psdi.util.MXException;
import psdi.webclient.system.beans.DataBean;

public class WzlyTableBean extends DataBean {
	public int addwzly() throws MXException {
		try {
			MboRemote wo = this.app.getAppBean().getMbo(0);
			String wonum = wo.getString("WONUM");
			MboSetRemote mboSet = wo.getMboSet("WO_WZLY");
			MboRemote add = mboSet.add();
			add.setValue("WORKTYPE", "LL", 11L);
			add.setValue("PARENT", wonum, 11L);
			this.app.getDataBean("1379912733891").refreshTable();
			this.app.getAppBean().refreshTable();
			this.app.getAppBean().reloadTable();
			toggledetailstate(true);
		} catch (RemoteException e) {
			e.printStackTrace();
		}
		return 1;
	}

}
